import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "Home",
            component: () => import("../pages/Home/index.vue"),
            meta: { title: "欢迎你使用Eta服务" }
        },
    ],
});
// 路由守卫
router.beforeEach((to) => {
    if (to.meta.title) {
        document.title = to.meta.title;
    }
});
export default router;
